<template>
  <Ceshi :flag="flag" :error1="error1" @addFn="addFn"></Ceshi>
</template>

<script>
import Ceshi from './Ceshi.vue'
import {reactive,ref} from 'vue'
export default {
  components:{Ceshi},
  setup(){
    const flag=reactive({})
    const error1=ref({a:10,b:20})

    setTimeout(() => {
      flag.a=10
      flag.b=20
    });
    
    function addFn(){
      flag.a++
      flag.b--
    }

    return {flag,error1,addFn}
    //! setup函数里面当同步代码执行完毕后就执行return
  }
}
</script>

<style>

</style>